import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/index'
  },
  {
    path: '/index', //首页
    name: 'index',//首页具体的名字
    component: () => import( '../views/index/index.vue')
  },
  {
    path: '/member', //会员
    name: 'member',
    component: () => import( '../views/member/index.vue')
  },
  {
    path: '/order', //订单
    name: 'order',
    component: () => import( '../views/order/index.vue')
  },
  {
    path: '/my', //我的
    name: 'my',
    component: () => import( '../views/my/index.vue')
  }
]

const router = new VueRouter({
  routes,
  linkActiveClass:'select' //路由跳转时动态添加样式
})

export default router
